package com.nineclock.approve.nodeResolver.impl;

import cn.hutool.json.JSONObject;
import com.nineclock.approve.nodeResolver.ProcessNodeResolver;
import org.activiti.bpmn.model.EndEvent;
import org.activiti.bpmn.model.Process;

/**
 * @author 黑马程序员
 * @Company http://www.ithiema.com
 * @Version 1.0
 */
public class EndNodeResolver extends ProcessNodeResolver {
    @Override
    public void addFlowNodeToActiviti(Process process, JSONObject currNode, JSONObject nextNode) {
        EndEvent endEvent = new EndEvent();
        endEvent.setId(super.getNodeId(currNode));
        endEvent.setName(currNode.getStr("name"));

        process.addFlowElement(endEvent);

    }
}
